// import interface.
#include "dynamic.h"
#include <stdio.h>
#include <windows.h>
#include <assert.h>

char fmt[] = "+ %d\r\n";
DWORD WINAPI ThreadFunc(LPVOID pvPara) {
	printf(fmt, --counter);
	return 0;
}

int main(void) {
	char input;
	HANDLE hThread;
	DWORD dwThreadId;

	ShowMsgCmd();
	ShowMsgGui();

	while (scanf("%c", &input), input != 'q') {
		while (getchar() != '\n') {
			NULL;
		}

		hThread = (HANDLE)_beginthreadex(NULL, 0, ThreadFunc, NULL, 0, &dwThreadId);
		CloseHandle(hThread);
	}
	return 0; 
}
